import axios from "axios";
import {LoginData, LoginRes} from "@/api/user";
import {configs} from "@typescript-eslint/eslint-plugin";

export interface PopularRecord {
    key: number;
    clickNumber: string;
    title: string;
    increases: number;
}
export interface PolicyRecord {
    id: number;
    version: number;
    version_name: string;
    blueprint: string;
    create_time:string;
    cat_id: number;
    cat_second_id: number;
    cat_name: string;
    cat_second_name: string;
}

export interface PolicyParams extends Partial<PolicyRecord> {
    current: number;
    pageSize: number;
    selected:number;

}
export interface Pagination {
    current: number;
    pageSize: number;
    total?: number;
    selected:number;
}
export function contentTypeOptionsCatPlateVersionPart(data:any) {

    return axios.get<any>('/admin/cat_plate_module/list',{
        params: {
            plate_id:data,
        }
    });
}
//查询列表信息
export function queryPlateModulePartList(data:any) {

    return axios.get<any>('/admin/module_part/list',{
        params: {
            module_id:data.selected,
        }
    });
}
export function queryPartList() {
    return axios.get<any>('/admin/part/list');
}
export function addModulePart(data:any) {
    return axios.post<any>('/admin/module_part/add',data);
}
export function plateModuleAddNumber(data:any) {
    return axios.post<any>('/admin/module_part/modify_number',data);
}
export function deletePlateModulePart(data:any) {
    return axios.post<any>('/admin/module_part/del',data);
}